#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>
#include<stdlib.h>
#include<fcntl.h>
#include<stdio.h>
#include<wait.h>
char buf1[] ="abc";
char buf2[] ="ABC";
int main(){
	int fd;
	if((fd = creat("hole.txt",S_IRWXU))<0){
		//error
	}
	if(write(fd,buf1,3)!=3){
		//error
	}
	if(lseek(fd,100,SEEK_SET) == -1){
		//从头部偏移
		//error
	}
	if(write(fd,buf2,3)!=3){
		//error
	}
	exit(0);
}
